home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-07-11 | 370 b | 22 lines | [TEXT/ttxt] |
- ;GEM has no shift but you can can make one
- ; just use rotate
- begin_code
- copy #127=>reg0 ; 7 ones
- copy #16=>reg2 ; will shift it 16 bits (and disappear)
- looptop
- jump:subroutine shift
- subtract #1=>reg2
- compare #0=>reg2
- jump:less looptop
- halt
- noop
- shift
- rotate reg0
- and mask=>reg0 ;1111...0
- return
- end_code
- begin_data
- mask constant -2
- end_data
- end
-